//nav 移入移出显示隐藏
let yi_a =  document.querySelectorAll('.yi-a');
let er_a =  document.querySelectorAll('.er-list');
for (let i = 0; i <yi_a.length ; i++) {
  yi_a[i].onmouseover = function(){
    er_a[i].style.display = "block"
  }
  yi_a[i].onmouseout = function(){
      er_a[i].style.display = "none"  
  }
  er_a[i].onmouseover = function(){
    er_a[i].style.display = "block"
  }
  er_a[i].onmouseout = function(){
    er_a[i].style.display = "none"
  }
}
// 返回顶部
let t_img = document.getElementById('t-img');
window.onscroll=function(){
  let win_w = document.documentElement.scrollTop;
  win_w > 40? t_img.style.display = "block" : t_img.style.display = "none"
} 
// 缓动回顶部
t_img.onclick = function(){
  window.scrollTo({
    top:0,
    behavior:"smooth"
  })
}
//关闭下方固定定位
 let btn = document.getElementById('off');
 let fb_box = document.getElementById('flex-b');
 btn.onclick = function(){
  fb_box.style.display = "none"
 }
//  点击vx图标
 function vx_block(){
  const vx = document.getElementById('vx');
   const vx_btn = document.getElementById('vx_btn');
   vx_btn.onclick = function(){
    vx.style.display = "block"
    document.documentElement.style.overflow = "hidden"
   }
 }
 vx_block()
// 点击vx关闭
 function vx_close(){
   const vx_i = document.querySelectorAll('#v_box_close');
   const vx = document.getElementById('vx');
   for (var i = 0; i <vx_i.length ; i++) {
      vx_i[i].onclick = function(){
        vx.style.display = "none"
        document.documentElement.style.overflow = "visible"
      }
   }
 }
 vx_close()